<?php

namespace App\Http\Middleware;

use Closure;

class StopMiddleware
{
    /**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */
    public function handle($request, Closure $next)
    {



        if(session('stop')==1 && !empty(session('stop')))
        {
            
            // return redirect('/admin/login')->with(['info'=>'先登录吧亲']);
            return redirect('/home/stop');
        }else
        {
           return $next($request); 
        }
        
    }
}
